package com.spring.core.model;
import java.util.Map;
/**
 * @Author 琦哥 110
 * @Date 2018/7/5 11:18
 */
public class InternalResourceViewResolver {
	public static final String REDIRECT_URL_PREFIX = "redirect:";
	public static final String FORWARD_URL_PREFIX = "forward:";
	private String prefix;
	private String suffix;
	
	public InternalResourceViewResolver(String prefix, String suffix) {
		super();
		this.prefix = (prefix != null ? prefix : "");
		this.suffix = (suffix != null ? suffix : "");
	}

	public String getPrefix() {
		return prefix;
	}

	public void setPrefix(String prefix) {
		this.prefix = (prefix != null ? prefix : "");
	}

	public String getSuffix() {
		return suffix;
	}

	public void setSuffix(String suffix) {
		this.suffix = (suffix != null ? suffix : "");
	}

	// 请求的真实路径。
	public String getJspLocation(String requestPath) {
		if (requestPath == null) {
			System.out.println("没有发现这个请求！");
			return "";
		} else {
			return this.prefix + requestPath + this.suffix;
		}

	}
}
